As JWs are fully aware, the Babylonians took the elite and powerful of Judah into captivity. As they sat by the rivers of Babylon (Psalm 137) and they despaired at the destitute state of Jerusalem and its temple (Dan 9), they sought to understand how it could be that God's chosen people had come to the point of extinction. These were desparate times.
So whom did the priests and scribes blame? It was clear to them that God was punishing the nation because they had failed to heed the warnings of the prophets, the priests of Israel and of Judah. It was everyone else's fault, not the priests'.
To show that this was so, they wrote and rewrote their Scriptures, showing that these warnings had been given and what the people had to do in order for the nation to be restored - and for the priesthood to be restored to its rightful position of supreme authority (this time without the encumbrance of the royal household) - as is shown by the fundamentalist actions of Ezra and of the parties that resulted from the Captivity (Pharisees, etc.).
Scriptures they created/rewrote include Deuteronomy, Joshua, Judges, Samuel and Kings. These were all propaganda to suit their purposes. So demands to obedience, for the supremacy of Jerusalem, and so on need to be read in that light. The remainder of the populace, the People of the Land, were illiterate, so we do not know much of their views, although we can gain some idea from the condemnations by the OT writers and from archaeology - they were pluralists, not monotheists, who gave a wife to YHWH, named Asherah, and worshiped them equally.
To read any statement made by the priestly class requires understanding of the contemporary context. Only then can a decision be made on the relevance or otherwise of anything contained in their writings.
Doug